ViStatoPDF. Saving ViSta plots as vector files

Pedro Valero-Mora. Universitat de Valencia
valerop@uv.es

1. Introduction
2. History
3. Useful hints
4. Limitations


1. Introduction

ViStatoPDF is a set of files that produce PDF files from plots in ViSta. PDF files have several advantages over simply copying and pasting bitmap images from plots. In particular:

-They can be visualized over many different platforms either using Acrobat Reader or Ghostscript.
-They can be imported and manipulated by different graphic programs, so fonts, colors, lines, etc, can be customized (more on this in the Useful hints section).
-They can be resized without losing quality.

2. History.

The origen of ViStatoPDF was PDF-PLOT, a code developed by Steven D. Majewski from the University of Virginia and made available on the UCLA server. He deserves more credit that I for this work because he found solutions for the main problems. I basically got his code and did the necessary modifications so it would run with ViSta. Some of the changes were:

-Plots saved are not unusable after PDF-PLOT has done his job. This is done by recovering the original methods in the plots that PDF-PLOT modifes.
-I developed specific files for the different plots in ViSta taking into account their idiosincratic features. This is a shame because it makes more difficult to add modifications or updates but. Before takind this decision I had developed a file with a lot of conditionals that modified the output depending on the plot but the code became quite entangled so I decide to create different files. 
-Acrobat Reader (or the program instructed to open .pdf files in the computer of the user) show the plot automatically.

I still plan to add other features such as dialog boxes for controling options, etc.


3. Useful hints

.pdf files are fine if you use programs that can import them. If you do not, you can print the file from Acrobat using the option of "printing to a file" to the driver of a postscript printer. You do not have to have the actual printer to do that. I am using the driver for the Apple Color Laserwriter 12/600 with optimal results. If you do this with a b&w printer, colors will not be saved (I think). The result is a postscript file that can be imported into many more programs than .pdf files. However, many programs that can open postscript files can not visualize them.
Ghostscript is a free program available from many places that can open postscript files and save them in many different formats. In fact, Ghostscript should be able to open .pdf files directly but there seems to be a problem with ViStatoPDF so you may need the intermediate step of printing to a file to use it. There are two formats that Ghostscript can create that are of interest here. EPS files are like postscript files but have a bitmap image included. EPS files can be imported in many programs with the advantage over simple postscript files that they can be visualized on the screen. However, as the postscript information is still present, when printed to a postscript printer the quality of the graph will be as good as normal postscript. Other interesting format is .wmf. This format can be opened using Microsoft programas and manipulated with them. Finnally, if you can afford a drawing program such as CorelDraw, it will open the postscript files and will give you the full power of manipulating it until the last detail.
 

4. Limitations

The plots saved with ViStatoPDF are not:
- An exact reproduction of what is seen on the screen. I removed some elements and added some others. I like the result but I am open to hear your opinions.
- Perfect. Getting all the plots right are quite difficult given the way that Lisp-Stat works. There will be always small details or elements that will not be saved. However, you may let me know your specific problem and I might try to solve it.



Pedro Valero
Valencia, 2003
